home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 14470 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: news.magmacom.com!not-for-mail
  2. From: ezust@mag1.magmacom.com (Acme Instant Dehydrated Boulder Kit)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: copy ctor for abstract classes?
  5. Date: 30 Mar 1996 19:39:27 -0500
  6. Organization: Cloud-Zero, Canada
  7. Message-ID: <4jkk7v$oo5@mag1.magmacom.com>
  8. References: <4jk8kg$e9h@darkstar.ucsc.edu>
  9. NNTP-Posting-Host: mag1.magmacom.com
  10.  
  11. In article <4jk8kg$e9h@darkstar.ucsc.edu>, Ray Swartz <ray@cse.ucsc.edu> wrote:
  12. >Should an abstract base class have a copy constructor?
  13. >
  14.  
  15. Don't see why not... The copy constructor will be automatically generated
  16. for you if you don't write one, which will do a member-by-member copy. It
  17. gets called automatically when you make a copy of a derived object. If your
  18. base class does any kind of external resource management, it is appropriate
  19. to write a copy constructor, regardless of whether it is an abstract base
  20. class or not.
  21.  
  22.  
  23. -- 
  24. Alan Ezust                       "Just because I work for the federal
  25. Ottawa, Canada                    government doesn't mean I'm an expert
  26. ezust@magmacom.com                on cockroaches"  -Special Agent Fox Mulder
  27. http://www2.magmacom.com/~ezust   
  28.